package com.ztesoft.huangfu.learning.springboot.springbootssjwt;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * 　Author: huangfu.daohui
 * 　Date: 2018/6/19 18:59
 * 　Description:
 * 参考文档：
 * https://gitee.com/micai/springboot-springsecurity-jwt-demo
 * https://blog.csdn.net/linzhiqiang0316/article/details/78358907
 * https://www.jianshu.com/p/6307c89fe3fa
 * https://blog.csdn.net/huaqiangu1123/article/details/78751005
 **/
@SpringBootApplication
@MapperScan(basePackages = {SpringbootSsJwtApplication.BASE_PACKAGED_INTERFACE_DAO, SpringbootSsJwtApplication.BASE_PACKAGED_INTERFACE_MAPPER})
public class SpringbootSsJwtApplication {
    static final String BASE_PACKAGED_INTERFACE_DAO = "com.ztesoft.**.dao";
    static final String BASE_PACKAGED_INTERFACE_MAPPER = "com.ztesoft.**.mapper";

    public static void main(String[] args) {
        SpringApplication.run(SpringbootSsJwtApplication.class, args);
    }

    @Bean
    public BCryptPasswordEncoder bCryptPasswordEncoder() {
        return new BCryptPasswordEncoder();
    }
}
